﻿    @{
        Layout = "~/Views/Shared/_Layout.cshtml";
        var X = Html.X();
    }
    
    @section Head{
    <script type="text/javascript">
        var onAfterRender = function () {
            this.setRawValue(Ext.util.Format.date(this.getRawValue(), "d F Y h:m A"));
        }

        var onSelect = function (combo, record, index) {
            console.log("Inicio evento onSelect del combo");
            this.setRawValue(Ext.util.Format.date(record[0].data.fecha_hora_inicio, "d F Y h:m A"));
            App.liquidacionId.setValue(record[0].data.liquidacion_id);
            App.storeMovimientoUsuario.load();
            App.btnNuevo.setDisabled(false);
            App.btnCerrarLiquidacion.setDisabled(false);
            App.detalleMovimiento.setDisabled(false);
            App.btnActualizarGrid.setDisabled(false);
        }

        var onBlur = function () {
            this.setRawValue(Ext.util.Format.date(this.getRawValue(), "d F Y h:m A"));
        }
    </script>
    }

    @(X.Viewport().Layout(LayoutType.Border)
            .Items(
                X.Panel()
                    .BodyStyle("background-color: transparent;")
                    .Region(Region.Center)
                    .LayoutConfig(new HBoxLayoutConfig() { Align = HBoxAlign.Stretch, Pack = BoxPack.Start })
                    .ItemsFromPage(this, "~/Areas/Parqueos/Views/MovimientoUsuario/_Grid.cshtml")
            )
    )